import { request } from "./request";
const platformApi = {
    findAllStore: (params: any) => {
        return request({
            params,
            url: '/jsAccount/findAllStore',
            method: 'get',
        })
    },
    addOrganization: (data: any) => {
        return request({
            data,
            url: '/jsAccount/addOrganization',
            method: 'post',
        })
    },
    findCurrentOrganization: () => {
        return request({
            url: '/jsAccount/findCurrentOrganization',
            method: 'get',
        })
    },
    findBasicsInfoTree: (params: any) => {
        return request({
            params,
            url: '/jsBasicsInfo/findBasicsInfoTree',
            method: 'get',
        })
    }, 
    addOrUpdateBasicsInfo: (data: any) => {
        return request({
            data,
            url: '/jsBasicsInfo/addOrUpdateBasicsInfo',
            method: 'post',
        })
    },
    updateBasicsStatus: (data: any) => {
        return request({
            data,
            url: `/jsBasicsInfo/updateStatus?id=${data.id}&status=${data.status}`,
            method: 'put',
        })
    },
    deleteBasicsInfo: (id: string) => {
        return request({
            url: `/jsBasicsInfo/deleteBasicsInfo/${id}`,
            method: 'delete',
        })
    },
    findDoctorList: (params: any) => {
        return request({
            params,
            url: '/jsDoctor/findDoctorList',
            method: 'get',
        })
    },
    addOrUpdateDoctor: (data: any) => {
        return request({
            data,
            url: '/jsDoctor/addOrUpdateDoctor',
            method: 'post',
        })
    },
    updateDoctorStatus: (data: any) => {
        return request({
            data,
            url: `/jsDoctor/updateDoctorStatus?id=${data.id}&status=${data.status}`,
            method: 'put',
        })
    },
    findInviteIncomeIntegral: () => {
        return request({
            url: '/jsInviteIncomeIntegral/findInviteIncomeIntegral',
            method: 'get',
        })
    },
    updateInviteIncomeIntegral: (data: any) => {
        return request({
            data,
            url: '/jsInviteIncomeIntegral/updateInviteIncomeIntegral',
            method: 'post',
        })
    },
    importPatientDataByName: (data: any) => {
        return request({
            data,
            url: '/jsPatient/importPatientDataByName',
            method: 'post',
        })
    },

    getPatientPage: (params: any) => {
        return request({
            params,
            url: '/jsPatient/getPatientPage',
            method: 'get',
        })
    }, 
    getPatientDetail: (id: string) => {
        return request({
            url: '/jsPatient/getPatientDetail?id='+id,
            method: 'get',
        })
    }, 
    addActivity: (data: any) => {
        return request({
            data,
            url: '/jsActivity/addActivity',
            method: 'post',
        })
    },
    integralRuleManageGetConfig: () => {
        return request({
            url: '/integralRuleManage/getConfig',
            method: 'get',
        })
    }, 
    getIntegralConfigList: () => {
        return request({
            url: '/jsInviteIncomeIntegral/getIntegralConfigList',
            method: 'get',
        })
    }, 
    putIntegralConfigList: (data) => {
        return request({
            data,
            url: '/jsInviteIncomeIntegral/saveIntegralConfig',
            method: 'post',
        })
    }, 
    putIntegralRuleManage: (data) => {
        return request({
            data,
            url: '/integralRuleManage/saveConfig',
            method: 'post',
        })
    },
    getUserIntegralList: (params) => {
        return request({
            params,
            url: '/integralRuleManage/getUserIntegralList',
            method: 'get',
        })
    }, 
    getUserIntegralDetailStatistics: (params) => {
        return request({
            params,
            url: '/integralRuleManage/getUserIntegralDetailStatistics',
            method: 'get',
        })
    }, 
}
export default platformApi